#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QGeoPositionInfo>
#include <QGeoPositionInfoSource>

QTM_USE_NAMESPACE

class QDeclarativeView;

namespace Ui {
    class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();
    Q_PROPERTY(QString mapProvider READ mapProvider WRITE setMapProvider NOTIFY mapProviderChanged)
    QString mapProvider();
    void setMapProvider(QString newMapProvider);

private slots:
    void mapProviderSelected(int);
    void positionUpdated(QGeoPositionInfo);

signals:
    void mapProviderChanged(QString);
    void posUpdated(double lat, double lon);

private:
    Ui::Widget *ui;
    QDeclarativeView* m_view;
    QGeoPositionInfoSource* m_geoSource;
    QString m_mapProvider;
};

#endif // WIDGET_H
